Brown the beef, onion, and garlic:
Heat the oil in a large, deep-sided skillet over medium-high. Add the beef, onion, and garlic. Cook, stirring often and breaking up the beef with a wooden spoon, until the beef is browned, 4 to 5 minutes. Do not drain the beef. Transfer to a medium heatproof bowl.
Brown the mushrooms:
Without wiping the skillet clean, add the butter and heat over medium-high until melted. Add the mushrooms. Cook, stirring occasionally, until golden brown and tender, 6 to 8 minutes.
Make the sauce:
Reduce the heat to medium. Add the flour and cook, stirring constantly, until lightly browned, about 2 minutes. Gradually whisk in the beef broth until smooth. Stir in the reserved beef mixture, Worcestershire sauce, mustard, thyme, and pepper.
Bring to a simmer over medium heat. Cook, stirring occasionally, until the flavors meld and the sauce thickens, 5 to 7 minutes. Taste, adding salt as needed.
Garnish and serve:
Remove from the heat. Garnish with fresh thyme leaves and serve over the cooked pasta.
Store leftovers in an airtight container in the refrigerator for up to 4 days.